package org.springframework.example.t0830.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.PayloadApplicationEvent;
import org.springframework.stereotype.Component;

public class MyListener implements ApplicationListener<PayloadApplicationEvent<String>> {


	@Override
	public void onApplicationEvent(PayloadApplicationEvent<String> event) {
		System.out.println(event.getPayload());
		try {
			Thread.sleep(3000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
